import axios from '../utils/http'

const RoleStore = {
    namespaced:true,
    state:()=>({
        role_list:[]
    }),
    mutations:{
        RoleMutations(state,list){
            state.role_list = list
        }
    },
    actions:{
        RoleActions(context){
            axios.get('/api/rolelist').then(res=>{
                if(res.code === 200){
                    context.commit('RoleMutations',res.list)
                }
                
            })
        }
    }
}
export default RoleStore